This method calculates the Linear Regression Slope.
var LREGS(period, dataArray, calculatedDataArray);
period
Period integer value.
dataArray
Array object filled with close prices.
calculatedDataArray
Empty Array object that will be filled with calculated data.
Returns true if calculation was completed successfully, or false otherwise.
The following example demonstrates how to use LREGS method.
function calculate(beginIndex, endIndex)
{
var period = 15;
var dataArray = new Array();
//populate data arra...
...
...
var calculatedDataArray = new Array();
var rc = TechnicalAnalysis.LREGS(period, dataArray, calculatedDataArray);
}
Copyright © 2006-2009 ActiveTick LLC